package s01;

/**
 * @ClassName Test
 * @Description TODO
 * @Author Li
 * @Date 2022/8/2 11:13
 * @ModifyDate 2022/8/2 11:13
 * @Version 1.0
 */
public class Test01 {
    public static void main(String[] args) {
        // 创建Role对象
        Role role = new Role(1,616,"盖伦");
        // 创建Weapon对象
        Weapon weapon = new Weapon();
        weapon.setName("多兰剑");
        weapon.setHurt(8);
        // 创建Armour对象
        Armour armour = new Armour();
        armour.setName("反伤甲");
        armour.setProtect(250);
        // 设置武器和盔甲
        role.setWeapon(weapon);
        role.setArmour(armour);

        // 攻击
        role.attack();
        // 盔甲
        role.defense();
    }
}
